<?php
/**
 * Project: HTPHouDuan
 * User: xilibo
 * Date: 2018/1/24
 */

namespace app\common\model;

use think\Model;

/**
 * 游戏下注模型
 */
class GameBetModel extends BaseModel
{
    protected $tableName = 'game_bet';

    /**
     * 获取会员下注量
     * @param  [type] $where [description]
     * @param  [type] $field [description]
     * @return [type]        [description]
     */
    public function betList($where = [], $field = [])
    {
        $betList = [];
        try {
            $betList = Db::name($this->tableName)->alias('gb')
                ->field($field)
                ->where($where)
                ->join('__USER__ u', 'gb.user_id = u.id')
                ->select();

        } catch (Exception $e){
            throw $e;
        }

        return $betList;
    }

}
